//**********************//
//* A Data Base Parody *//
//**********************//

#ifndef BASE_H
#define BASE_H

#include <fstream>

namespace lmf {

//********************//
//* Currently a base *//
//********************//

struct Base
{
// base name field
	char cName[15];
// filestream (binary)
	std::fstream fsFile;
	int dat_size;
// methods
	Base(); // empty base, not workable
	Base(const char*,int); // base opens or will be created depending on its existence
	bool create(const char*,int); // base will be created (optionaly replaces one with the same name)
	bool open(const char*,int); // base will be opened, error if not exists
	bool close(); // closes the base error if not opened
	int gsize(); // returns number of rows in file
	~Base(); // destructor (closes the base)
};

bool is_exist(const char*); // check for file existance

}

#endif
